#include<stdio.h>
void main()
{
	int x;
	for(x = 7; x <= 10000; x+=7) 
	{
		printf("%d",x);
		if(x%7==0)
		printf("\n");
	}
	x++;
	}
